package wechat.base.snd;

import com.google.common.base.Objects;
import org.eclipse.xtend.lib.annotations.Accessors;
import org.eclipse.xtext.xbase.lib.Pure;
import wechat.base.snd.encoding.JsonPut;

@SuppressWarnings("all")
public class WCNewsItem {
  @Accessors
  private String title;
  
  @Accessors
  private String description;
  
  @Accessors
  private String url;
  
  @Accessors
  private String picurl;
  
  public WCNewsItem(final String title) {
    this.title = title;
  }
  
  public JsonPut toJson() {
    JsonPut _xblockexpression = null;
    {
      final JsonPut article = new JsonPut();
      article.putObj("title", this.title);
      boolean _notEquals = (!Objects.equal(this.description, null));
      if (_notEquals) {
        article.putObj("description", this.description);
      }
      boolean _notEquals_1 = (!Objects.equal(this.url, null));
      if (_notEquals_1) {
        article.putObj("url", this.url);
      }
      boolean _notEquals_2 = (!Objects.equal(this.picurl, null));
      if (_notEquals_2) {
        article.putObj("picurl", this.picurl);
      }
      _xblockexpression = article;
    }
    return _xblockexpression;
  }
  
  @Pure
  public String getTitle() {
    return this.title;
  }
  
  public void setTitle(final String title) {
    this.title = title;
  }
  
  @Pure
  public String getDescription() {
    return this.description;
  }
  
  public void setDescription(final String description) {
    this.description = description;
  }
  
  @Pure
  public String getUrl() {
    return this.url;
  }
  
  public void setUrl(final String url) {
    this.url = url;
  }
  
  @Pure
  public String getPicurl() {
    return this.picurl;
  }
  
  public void setPicurl(final String picurl) {
    this.picurl = picurl;
  }
}
